package o;

import android.text.TextUtils;
import com.huawei.appgallery.wishlist.bean.WishInfoListCache;
import org.json.JSONObject;

public class dct extends BaseSharedPref {
    private static volatile dct ˊ = null;

    private dct() {
    }

    public static synchronized dct ˏ() {
        dct o_dct;
        synchronized (dct.class) {
            if (ˊ == null) {
                ˊ = new dct();
            }
            o_dct = ˊ;
        }
        return o_dct;
    }

    public WishInfoListCache ˎ() {
        WishInfoListCache wishInfoListCache = new WishInfoListCache();
        Object ॱ = ˊ.ॱ("unrealized_wish_infos", "");
        if (!TextUtils.isEmpty(ॱ)) {
            try {
                wishInfoListCache.fromJson(new JSONObject(ॱ));
            } catch (Throwable e) {
                dch.ˎ.ˊ("WishSharedPreference", "load cache Data failed.", e);
            } catch (Throwable e2) {
                dch.ˎ.ˊ("WishSharedPreference", "load cache Data failed.", e2);
            } catch (Throwable e22) {
                dch.ˎ.ˊ("WishSharedPreference", "load cache Data failed.", e22);
            } catch (Throwable e222) {
                dch.ˎ.ˊ("WishSharedPreference", "load cache Data failed.", e222);
            }
            return wishInfoListCache;
        }
        ˋ();
        return wishInfoListCache;
    }

    protected void ˋ() {
        ˊ.ʼ("unrealized_wish");
    }

    public void ˎ(WishInfoListCache wishInfoListCache) {
        try {
            ˊ.ˋ("unrealized_wish_infos", wishInfoListCache.toJson());
        } catch (IllegalAccessException e) {
            dch.ˎ.ˊ("WishSharedPreference", "update cache failed.");
        }
    }

    public void ॱ(boolean z) {
        ˋ("sync_wish_wall", z);
    }

    public boolean ॱ() {
        return ˏ("sync_wish_wall", false);
    }

    public void ˋ(boolean z) {
        ˋ("never_show_sync_wish_wall_dialog", z);
    }

    public boolean ˊ() {
        return ˏ("never_show_sync_wish_wall_dialog", false);
    }
}
